package cn.iocoder.lw.framework.common.event;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.time.LocalDateTime;

/**
 * 管理员用户创建事件
 * 当系统用户创建时发布此事件，供其他模块监听处理
 */
@Getter
public class AdminUserCreateEvent extends ApplicationEvent {

    /**
     * 系统用户ID
     */
    private final Long userId;

    /**
     * 用户名
     */
    private final String username;

    /**
     * 用户昵称
     */
    private final String nickname;

    /**
     * 用户手机号
     */
    private final String mobile;

    /**
     * 用户邮箱
     */
    private final String email;

    /**
     * 用户状态
     */
    private final Integer status;

    /**
     * 用户类型
     */
    private final Integer userType;

    /**
     * 部门ID
     */
    private final Long deptId;

    /**
     * 岗位ID列表
     */
    private final String postIds;

    /**
     * 创建时间
     */
    private final LocalDateTime createTime;

    public AdminUserCreateEvent(Long userId, String username, String nickname, String mobile,
                              String email, Integer status, Integer userType, Long deptId,
                              String postIds, LocalDateTime createTime) {
        super(userId);
        this.userId = userId;
        this.username = username;
        this.nickname = nickname;
        this.mobile = mobile;
        this.email = email;
        this.status = status;
        this.userType = userType;
        this.deptId = deptId;
        this.postIds = postIds;
        this.createTime = createTime;
    }

}